/**
 * map容器封装了红黑树元素是pair键值对
*/
#include <iostream>
#include <map>
using namespace std;
int main()
{
    map<int,string> m1 {{1,"张三"},{4,"李四"},{2,"王五"}};//创建一个空的map容器
    for(auto val:m1){
        cout<<val.first<<" "<<val.second<<" \n";
    }
    return 0;
}